package com.docmanage.web.controller.am;

import com.docmanage.am.domain.AmFolder;
import com.docmanage.am.service.impl.AmDescriptionService;
import com.docmanage.am.service.impl.AmGroupService;
import com.docmanage.common.core.controller.BaseController;
import com.docmanage.common.core.domain.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/am/statistic")
public class StatisticController extends BaseController {

    @Autowired
    private AmDescriptionService amDescriptionService;

    @GetMapping(value = "docNums")
    public AjaxResult docNums()
    {
        Integer nums = amDescriptionService.docNums();
        return success(nums);
    }

    @GetMapping(value = "folderNums")
    public AjaxResult folderNums()
    {
        List<AmFolder> folderNums = amDescriptionService.folderNums();

        return success(folderNums);
    }
}
